home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
002
/
alltext.arc
/
PNP.TXT
< prev
next >
Wrap
Text File
|
1987-07-19
|
8KB
|
230 lines
Peeks 'n Pokes
Techniques for Getting More Out of the IBM PC Family
Published by
MicroHelp, Inc.
2220 Carlyle Dr.
Marietta GA 30062-5841
(404) 973-9272 (800) 922-3383
Peeks 'n Pokes is a collection of programs and techniques showing programmers
how to "get underneath the covers" of IBM and compatible personal computers.
This includes the PC, XT, AT, PS/2 and 386 machines.
Included is a routine that lets you "plug" characters into the keyboard. This
is great for running DOS commands, other programs and batch files when your
program exits to DOS.
In addition, this package includes "unprotection" for BASIC programs saved
with the "P" option - both IBM and GW-BASIC.
The manual and accompanying diskette contain instructions and sample programs
for letting you read and change the system configuration "on the fly".
While the majority of the programs are written with the BASIC programmer in
mind, the techniques learned can be applied to any programming languauge.
Routines are provided to the MS Pascal programmer that emulate much needed
BASIC functions.
A descriptions of the included programs appears after the following
summary of the manual:
Section 1 - Definition of Terms
-------------------------------
Defines bytes, bits, binary numbers, hexadecimal numbering, PEEK, POKE,
DEF SEG, BSAVE, BLOAD, Port, INP, OUT, logical operators (OR, AND, XOR),
registers, DOS and BIOS functions and Interrupts.
The most important part of this section teaches you how to read and change
the bits within a byte - the most fundamental part of computer programming.
Section 2 - Getting Started
---------------------------
How to use the programs and a listing of all programs.
Section 3 - The System Configuration
------------------------------------
Read the quipment flag. Determine the monitor, memory, number of printers,
number of game adapters and COM ports.
Read the CMOS chip on AT and later machines. Get the date and time,
number and type of diskette and disk drives, total memory, etc.
Section 4 - Unprotecting BASIC Programs
---------------------------------------
Guaranteed to work with all versions of Microsoft and IBM interpreted BASIC.
Section 5 - The Keyboard
------------------------
Read and change the keyboard state with PEEK's and POKE's. Includes
instructions for turning off the various shift states of the keyboard.
Memory-resident program that disables Ctrl-C and Ctrl-Break.
Shows you how to "plug" keystrokes into the keyboard.
Section 6 - The Video Monitor
-----------------------------
Turn your monitors on and off, swap monitors, turn blinking on and off,
read the cursor size and location, etc.
Section 7 - Disks
-----------------
Read the current diskette status, how many diskettes in the system,
number of bytes per sector, amount of free disk space, etc.
Section 8 - Parallel Printer
----------------------------
Read the number of printers, printer status, swap printers (i.e., use
more than one printer as LPT1), etc.
PEEK at the printer status BEFORE printing - avoid printer timeouts.
Section 9 - Communications
--------------------------
Read the number of ports, port status, swap COM ports (i.e., use more
than one COM port as COM1), etc.
Section 10 - DOS and BIOS functions
-----------------------------------
Perform DOS and BIOS function calls from compiled or interpreted BASIC.
Section 11 - Reading the disk directory
---------------------------------------
Find filenames and extensions, file size, file date and time, attributes,
etc. from compiled and interpreted BASIC.
Section 12 - Interpretive BASIC
-------------------------------
Important PEEK locations for IBM interpreted BASIC.
Section 13 - Generating Sound
-----------------------------
Shows you how to generate weird and wonderful sounds on your computer.
Section 14 - Miscellaneous
--------------------------
Clicking the speaker, reading the system time to within 1/18th of a
second. Calculate the date x days from today. Inter-program data storage
locations.
Section 15 - Finding More PEEK's and POKE's
-------------------------------------------
How to find other important memory locations, comparing two files,
calculating the needed AND, OR and XOR arguments to isolate, clear,
set and toggle the bits within a byte.
Section 16 - MS Pascal
------------------------------------
Pascal programs enabling DOS and BIOS function calls, emulating
INP, OUT, PEEK and POKE.
Appendix A - PEEK and POKE Summary
----------------------------------
A quick reference of important memory locations and their meanings.
Programs included:
MENU.BAS - BASIC menu program used to access the interpretive BASIC
programs on the diskette.
CONFIG.BAS - Read the system configuration.
KEYREAD.BAS - Read the keyboard status.
KEYSET.BAS - Set and clear the keyboard.
KEYPLUG.BAS - Plug keys into the keyboard buffer as if they had been
typed in.
KEYOFF.BAS - Turn the keyboard off and on (not for AT machines)
CRT.BAS - Read the monitor status.
CRTSWAP.BAS - Swap monitors in BASIC.
CRTDEMO.BAS - POKE colors and characters into the video memory, etc.
DISK.BAS - Read the diskette status.
LPT.BAS - Read the parallel printer(s) status.
LPTSWAP.BAS - Use more than one printer as LPT1.
COM.BAS - Read the RS-232 adapter(s) status.
COMSWAP.BAS - Swap adapters - use more than one port as COM1.
DOS2.BAS - DOS and BIOS function calls from interpreted BASIC.
DOS2C.BAS - Compilable short version of DOS2.BAS.
DOS2I.BAS - Short version of DOS2.BAS.
DIRI.BAS - Search the file directory from interpreted BASIC.
DIRC.BAS - Comilable version of DIRI.BAS.
BASIC.BAS - PEEK locations for IBM interpreted BASIC.
MISC.BAS - Miscellaneous PEEK's and POKE's.
BSAVE.BAS - Save memory for COMPARE.BAS.
ARRAY.BAS - Demonstrates BLOAD and BSAVE of an array from BASIC.
COMPARE.BAS - Comparison program for finding more PEEK's and POKE's.
CALC.BAS - PEEK and POKE calculation program.
BLOAD.BAS - Loads a BSAVE'd program into memory.
UNPIBM.COM and UNPALL.COM - BASIC unprotect programs.
UNPSET.BAS - Required for unprotecting non-IBM BASIC programs.
CTLRBRK.ASM and .COM - Disables Ctrl-C anc Ctrl-Break keys.
COLOR.ASM and .COM - Switch from mono to color monitor from DOS.
MONO.ASM and MONO.COM - Switch from color to mono monitor from DOS.
DOSSUB2.ASM and .OBJ - Assembler subroutine used with compiled BASIC
programs and DOSP.PAS.
DOSSUB2I.ASM and .OBJ - Assembler subroutine used with DOS2I.BAS.
BEEP.ASM and BEEP.COM - Beep the speaker once from batch files.
SOUNDER.ASM and SOUNDER.COM - Watch how your speaker works.
WAIT.ASM and WAIT.COM - Beep the speaker every five seconds while
waiting for a key press.
DOSP.PAS - MS Pascal DOS/BIOS function call example.
INOUT.PAS - Pascal equivalents of INP and OUT.
PEEKPOKE.PAS - Pascal equivalent of PEEK and POKE.